package com.atguigu.tingshu.album.mapper;

import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.query.album.TrackInfoQuery;
import com.atguigu.tingshu.vo.album.AlbumTrackListVo;
import com.atguigu.tingshu.vo.album.TrackInfoVo;
import com.atguigu.tingshu.vo.album.TrackListVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface TrackInfoMapper extends BaseMapper<TrackInfo> {


    /**
     * 分页查询用户创作的声音列表
     * @param pageParam
     * @param trackInfoQuery
     * @return
     */
    IPage<TrackListVo> findUserTrackPage(@Param("pageParam") IPage<TrackListVo> pageParam, @Param("vo") TrackInfoQuery trackInfoQuery);

    /**
     * 根据专辑id分页查询该专辑下声音列表
     * @param albumTrackListVoPage
     * @param albumId
     * @return
     */
    IPage<AlbumTrackListVo> getAlbumTrackListByAlbumIdFromDb(@Param("albumTrackListVoPage") IPage<AlbumTrackListVo> albumTrackListVoPage, @Param("albumId") Long albumId);
}
